package com.cet.designpatterns.factory.simplefactory.pizzastore.order;

import com.cet.designpatterns.factory.simplefactory.pizzastore.pizza.Pizza;

import java.lang.reflect.InvocationTargetException;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-09-01 22:32
 **/
public class OrderPizza3 {

    public OrderPizza3(Class<? extends Pizza> cls,String pizzaName) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        Pizza pizza = SimplePizzaFactory.create(cls, pizzaName);
        pizza.prepare();
        pizza.bake();
        pizza.cut();
        pizza.box();
    }
}
